Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 8, 2024 23:59
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory

Generating Procedural Game Worlds with Wave Function Collapse

Wave Function Collapse (WFC) by @exutumno is a new algorithm that can generate procedural patterns from a sample image. It's especially exciting for game designers, letting us draw our ideas instead of hand coding them. We'll take a look at the kinds of output WFC can produce and the meaning of the algorithm's parameters. Then we'll walk through setting up WFC in javascript and the Unity game engine.

sprites

The traditional approach to this sort of output is to hand code algorithms that generate features, and combine them to alter your game map. For example you could sprinkle some trees at random coordinates, draw roads with a brownian motion, and add rooms with a Binary Space Partition. This is powerful but time consuming, and your original vision can someti

@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active May 8, 2024 23:52
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@GrantTrebbin
GrantTrebbin / MagField2.py
Created November 28, 2015 10:31
In plane magnetic field of a current loop of radius a, distance r from the loop axis. Field will be perpendicular to the plane.
import numpy as np
import matplotlib.pyplot as plt
import scipy.special as sp
a = 1.55
current = 1
mu = 4 * np.pi / 10000000
# equal to sqrt(4ra(z^2 + (a+r)^2)^(-1))
def k_val (R, Z):
@six519
six519 / ntfs.md
Last active May 8, 2024 23:49
Read/write NTFS drive on macOS Ventura with Apple silicon processor

Configuring your Mac!

Change security settings

  • Shut down your Mac, then press and hold the power button until "Loading startup options" appear.
  • Select "Options"
  • In the menu on top of the screen, choose "Utilities" -> "Startup Security Utility".
  • Click "Security Policy"
  • Select "Reduced Security" and check "Allow user management of kernel extensions from identified developers".
  • Reboot
@GrantTrebbin
GrantTrebbin / rectangleBuilder.py
Created January 17, 2017 13:49
Create and Arrange Rectangles with relationships.
# rectangleBuilder
# Grant Trebbin - 2017_01_17
import svgwrite
class Rectangle:
def __init__(self, rectangle_width, rectangle_height):
# Calculate coordinates for corners and middle of sides for rectangle
# These are offset from the bottom left
@UserUnknownFactor
UserUnknownFactor / Japanese SFX.md
Last active May 8, 2024 23:47
Japanese game and manga text sound effect (SFX) database

Introduction

This is a compiled collection of common Japanese SFXs (sound effects or onomatopoeia).

This collection uses mostly Romaji transliterations. Some SFXs can be used in combination with other SFXs; some of them, or combinations thereof, can be written separately for emphasis within the same panel (example: do-ki-, ドッ キッ ), but can be considered part of the same action; some use repeated sub-elements or prolongation characters (ー) within them. All interjections can be written differently, usually to indicate particularly strong or repeated stimulation. For example, a cho in isolation is almost certainly a truncated version of chotto, where the speaker was distracted from finishing the word. A prolongation of a character, on the other hand, often implies lazy, harsh, or sloppy pronunciation, or possibly even a scream. Because of this, many SFXs can have multiple meanings, depending on the action drawn, as well as one's interpretation of that action.

A

a: general interjection and versa

@gerardorochin
gerardorochin / rfc regex
Created June 6, 2013 00:00
Expresion regular para validar RFC
/^([A-Z,Ñ,&]{3,4}([0-9]{2})(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[A-Z|\d]{3})$/
@noamtamim
noamtamim / README.md
Last active May 8, 2024 23:41
Markdown with PlantUML

How to use PlantUML with Markdown

PlantUML is a really awesome way to create diagrams by writing code instead of drawing and dragging visual elements. Markdown is a really nice documentation tool.

Here's how I combine the two, to create docs with embedded diagrams.

Step 0: Setup

Get the command-line PlantUML from the download page or your relevant package manager.